CXXFLAGS =-Wall -W -Wextra -pedantic

SRC= $(wildcard *.cpp)
OBJ=$(SRC:.cpp=.o)

TARGET = main.elf

####### Build rules

all: $(TARGET)

$(TARGET): $(OBJ)
	g++ -o $@ $^

%.o: %.cpp
	g++ -I. -o $@ -c $< $(CXXFLAGS)

clean: 
	-rm -f *.o *~ $(TARGET)

